home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / sheriffa / slsapi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-20  |  3.9 KB  |  152 lines

  1. // This is a part of the Sheriff System Development Kit.
  2. // Copyright (C) 1997-1999 Acudata Limted.
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Sheriff System Development Kit and related
  7. // electronic documentation provided with the SDK.
  8.  
  9. #ifndef SLSAPI_H
  10. #define SLSAPI_H
  11.  
  12. #include "licdefs.h"
  13. #include "lictype.h"
  14. #include "licscode.h"
  15.  
  16. #ifdef __cplusplus 
  17. extern "C"
  18. {
  19. #endif
  20.  
  21. HRESULT WINAPI SLS_Register(
  22.                     LPCSTR pszProductID,
  23.                     LPCSTR pszProductName,
  24.                     LPCSTR pszLicencePath);
  25.  
  26. HRESULT WINAPI SLS_License(
  27.                     LPCSTR pszProductID,
  28.                     SLS_LICENCE *pLicence,
  29.                     SLS_CHALLENGE *pChallenge);
  30.  
  31. HRESULT WINAPI SLS_Request(
  32.                     LPCSTR pszProductID,
  33.                     LPCSTR pszUserName,
  34.                     SLS_REQUEST *pRequest,
  35.                     SLS_PERMIT *pPermit,
  36.                     SLS_HANDLE *plLicenceHandle,
  37.                     SLS_CHALLENGE *pChallenge);
  38.  
  39. HRESULT WINAPI SLS_Update(
  40.                     LPCSTR pszProductID,
  41.                     SLS_HANDLE lLicenceHandle,
  42.                     SLS_UPDATE *pUpdate,
  43.                     SLS_PERMIT *pPermit,
  44.                     SLS_CHALLENGE *pChallenge);
  45.  
  46. HRESULT WINAPI SLS_Release(
  47.                     LPCSTR pszProductID,
  48.                     SLS_HANDLE lLicenceHandle,
  49.                     SLS_RELEASE *pRelease,
  50.                     SLS_CHALLENGE *pChallenge);
  51.  
  52. HRESULT WINAPI SLS_GetReference(
  53.                     LPCSTR pszProductID,
  54.                     LPSTR  pszReference);
  55.  
  56. HRESULT WINAPI SLS_SetLicence(
  57.                     LPCSTR pszProductID,
  58.                     LPCSTR pszReference,
  59.                     LPCSTR pszLicenceKey);
  60.  
  61. HRESULT WINAPI SLS_QueryLicenceInfo(LPCSTR pszProductID,
  62.                                      SLS_LICENCE_INFO *pLicenceInfo);
  63.  
  64. //Challenge
  65. HRESULT WINAPI SLS_CreateChallenge(
  66.                      SLS_SECRET *pSecretArray,
  67.                      int nSecrectSize,
  68.                      const BYTE *pbStream,
  69.                      int nStreamSize,
  70.                      SLS_CHALLENGE *pChallenge);
  71.  
  72. HRESULT WINAPI SLS_VerifyChallenge(
  73.                      SLS_SECRET *pSecretArray,
  74.                      int nSecrectSize,
  75.                      const BYTE *pbStream,
  76.                      int nStreamSize,
  77.                      SLS_CHALLENGE *pChallenge);
  78.  
  79. //SLS_GetErrorMessage
  80. //Get Error Mesaage. pszErrorMessage points to buffer allocated by caller, 
  81. //the minimum length of the buffer is 256 bytes
  82. HRESULT WINAPI SLS_GetErrorMessage(HRESULT hr,LPTSTR pszErrorMessage);
  83.  
  84. //Utilities
  85. HRESULT WINAPI SLS_IsProductInstalled(LPCSTR pszProductID);
  86. HRESULT WINAPI SLS_IsProductRegistered(LPCSTR pszProductID);
  87. HRESULT WINAPI SLS_IsProductLicensed(LPCSTR pszProductID);
  88.  
  89.  
  90. //SLS_SetReclaimTime is now obsolte and replaced by SLS_SetOptions
  91. HRESULT WINAPI SLS_SetReclaimTime(int nMinutes);
  92. HRESULT WINAPI SLS_SetOptions(
  93.                     LPCSTR pszProductID,
  94.                     SLS_HANDLE lLicenceHandle,
  95.                     SLS_OPTIONS *pOptions,
  96.                     SLS_CHALLENGE *pChallenge);
  97.  
  98. //Terminate
  99. HRESULT WINAPI SLS_Terminate(
  100.                     LPCSTR pszProductID,
  101.                     LPSTR  pszTerminationCode);
  102. //Remove
  103. HRESULT WINAPI SLS_Remove(
  104.                     LPCSTR pszProductID,
  105.                     DWORD  dwRemoveOption,
  106.                     SLS_CHALLENGE *pChallenge);
  107.  
  108. //Current Licence Status
  109. HRESULT WINAPI SLS_GetStatusCode(
  110.                     LPCSTR pszProductID,
  111.                     LPSTR  pszStatusCode);
  112.  
  113. //Export Licence
  114. HRESULT WINAPI SLS_ExportLicence(
  115.                     LPCSTR pszProductID,
  116.                     LPCSTR pszReference,
  117.                     SLS_LICENCE *pLicence,
  118.                     LPSTR  pszLicenceKey);
  119.  
  120. HRESULT WINAPI SLS_ImportLicence(
  121.                     LPCSTR pszProductID,
  122.                     LPCSTR pszReference,
  123.                     LPCSTR pszLicenceKey);
  124.  
  125. //Extended Function from 1.70
  126. //Publiser data
  127. HRESULT WINAPI SLS_SetPublisherData(LPCSTR pszProductID,LPCSTR lpszPublisherData);
  128. HRESULT WINAPI SLS_GetPublisherData(LPCSTR pszProductID,LPTSTR lpszPublisherData);
  129.  
  130. HRESULT WINAPI SLS_RequestEx(
  131.                     LPCSTR  pszProductID,
  132.                     LPCSTR pszUserName,
  133.                     DWORD   dwUserID,
  134.                     SLS_REQUEST *pRequest,
  135.                     SLS_PERMIT *pPermit,
  136.                     SLS_HANDLE *plLicenceHandle,
  137.                     SLS_CHALLENGE *pChallenge);
  138.  
  139. HRESULT WINAPI SLS_GetUserCount(LPCSTR  pszProductID,DWORD *pdwUserCount);
  140.  
  141. HRESULT WINAPI SLS_QueryUserInfo(
  142.                     LPCSTR  pszProductID,
  143.                     DWORD    dwUserIndex,
  144.                     SLS_USER_INFO *pUserInfo);
  145.  
  146. #ifdef __cplusplus  
  147. }
  148. #endif
  149.  
  150.  
  151. #endif
  152.